// Vocab

function hit(first,second) {
	post(showQuestion,"genquestion.php","first=" + first + "&second=" + second);
}

function showQuestion() {
	
	if (xmlHttp.readyState == 4) {
		document.getElementById("status").innerHTML="";
		document.getElementById("question").innerHTML=xmlHttp.responseText;
	}
}

function list() {
	post(showList,"genlist.php",null);
}

function showList() {

	if (xmlHttp.readyState == 4) {
		document.getElementById("list").innerHTML=xmlHttp.responseText + "<br><br><br>";
	}
}

function check(i) {

	ans = document.quizform.answer.value;
	if ( i == ans ) {
		document.getElementById("status").style.color="green";
		document.getElementById("status").innerHTML="Correct";	
	} else {
		document.getElementById("status").style.color="red";
		document.getElementById("status").innerHTML="Wrong";	
	}
}